package model.posicion;

public class Posicion {
	
	private int posX;
	private int posY;
	
	public Posicion(int x, int y){
		
		if (posX < 0 || posY < 0)
			throw new IllegalArgumentException();
		
		posX=x;
		posY=y;
	}

	public int getPosX() {
		
		return posX;
	}

	public void setPosX(int posX) {
		
		this.posX = posX;
	}

	public int getPosY() {
		
		return posY;
	}

	public void setPosY(int posY) {
		
		this.posY = posY;
	}
	
	@Override
	public boolean equals(Object pos){
		
		Posicion posicion=(Posicion)pos;
		if( (this.getPosX()==posicion.getPosX()) && (this.getPosY()==posicion.getPosY()) )
			return true;
		return false;
	}

}
